<template>
      <div>
          <makeFirst v-if="makeShow == false"  v-on:listenTochildEvent="showMsgChild"></makeFirst>
          <maakeOne v-else></maakeOne>
           <!-- <makeFirst></makeFirst> -->
      </div>
      
</template>
<script>
  import makeFirst from './orgMakeIndex'
  import maakeOne from './orgMakeOne'
  import {orgMakeSearch} from "../api/getData";
  export default {
        data:function(){
            return{
              popMessage:'',
              showPop:true,
              makeShow:true,
              parentMsg:'',
              codes:'',
            }
        },
        components:{makeFirst,maakeOne},
        mounted:function(){
          var organId = JSON.parse(window.sessionStorage.getItem("organid"));
          orgMakeSearch({"organId":organId}).then((data) => {
                if(data.data.code == 0){
                    this.makeShow = true
                }else{
                   this.makeShow = false
                }
          })
        },
        methods:{
            showMsgChild:function(data){
              console.log(data,'datadcs')
              this.makeShow = data
            }
        }
  }
</script>
<style lang='scss' scoped>
.popUp{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 99;
      background: rgba(0,0,0,.5);
      display: flex;
      justify-content: center;
      align-items: center;
      .popUpCenter{
         width: 400px;
          font-size: 20px;
          color: #000;
          border-radius: 5px;
          text-align: left;
          line-height: 32px;
          background: #fff;
           padding: 30px;
          h4{
            font-size: 20px;
            color: #000;
            
            border-radius: 5px;
            text-align: left;
            line-height: 32px;
          }
          .btn{
            margin-left: 270px!important;
          }
      }
     
    }
</style>


